<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8"/>
	<title>商品详情页 - yumcms</title>
	<link rel="stylesheet" href="/Public/Admin/css/main.css"/>
	<link rel="stylesheet" href="/Public/Admin/css/swiper.min.css"/>
	<link rel="stylesheet" href="/Public/Admin/css/colpack.css"/>
	<link rel="stylesheet" href="/Public/Admin/quilleditor/quill.snow.css"/>
	<style>
		.standalone-container {
			width: 100%;
		}

		.snow-container {
			height: 126px;
		}
	</style>
</head>
<body>
<div class="view-content" style="padding: 0">
	<div class="view-con">
		<div class="AddProducts">
			<ul class="APList">
				<li class="active <?php if($color_display['one'] == 1): ?>Act ActMain<?php endif; ?> Groupjump" alt="1" about="2">
					<span>基本信息</span>
					<div class="APListPre">
						<i>1</i>
					</div>
				</li>
				<li class="last active">
					<span <?php if($color_display['two'] == 1): ?>style="color:#0095d4"<?php endif; ?>>商品详情页</span>
					<div class="APListPre" <?php if($color_display['two'] == 1): ?>style="background-color: #0095d4;border: 2px solid #0095d4 !important;color: #fff !important;"<?php endif; ?>>
						<i>2</i>
					</div>
				</li>
			</ul>
		</div>
		<div class="AddShopping">
			<div class="PhoneTxt">
				<div class="PhoneMed">
					<div class="PMedCon">
						<div class="OverLay">
							<div class="ImgItem">

								<?php if(!empty($images_text)): if(is_array($images_text)): foreach($images_text as $key=>$vo): if($vo['typeid'] == 1): ?><div class="item-line1 exhibition_id">
												<?php if(is_array($vo['images'])): foreach($vo['images'] as $key=>$v): ?><div class="line1-img">
														<img src="<?php echo ($v['image']); ?>">
													</div><?php endforeach; endif; ?>
											</div>
											<?php elseif($vo['typeid'] == 2): ?>
												<div class="exhibition_id" id="snow-container-<?php echo ($vo['num']); ?>"><?php echo ($vo['text']); ?></div>
											<?php elseif($vo['typeid'] == 3): ?>
											<div class="item-line1 exhibition_id">
												<div class="item-line<?php echo ($vo['class_id']); ?>">
													<?php if(is_array($vo['addpage_group'])): foreach($vo['addpage_group'] as $key=>$v): ?><div class="line<?php echo ($vo['class_id']); ?>-img">
															<img src="<?php echo ($v['page_img']); ?>"/>
														</div><?php endforeach; endif; ?>
												</div>
											</div><?php endif; endforeach; endif; ?>
									<?php else: ?>
									<div class="item-line1 exhibition_id"></div><?php endif; ?>

							</div>
							<div class="CustomerTels" style="font-size: 16px;">售后电话： <em><?php echo ($addpage_info['as_phone']); ?></em></div>
						</div>
					</div>
				</div>
				<div class="PhoneContent">
					<div class="InstallList">
						<div>
							<div class="InstallBg"></div>
							<ul>
								<li class="active">图文设置</li>
							</ul>
						</div>
					</div>
					<div style="display: block" class="InstallMain InstallMainOver">
						<div class="AppendImgTxt">
							<?php if(!empty($images_text)): if(is_array($images_text)): foreach($images_text as $k=>$vo): if($vo['typeid'] == 1): ?><div class="InstallMainS2">
											<div class="TopImg">
												<em>图片</em>最多添加9张图片，超过不能成功上传，图片大小不能超过2M
											</div>
											<div class="UploadImg image_set">
												<?php if(is_array($vo['images'])): foreach($vo['images'] as $key=>$v): ?><div class="StorageImg"><img src="<?php echo ($v['image']); ?>"></div><?php endforeach; endif; ?>
												<div alt="9" class="shareImage FilImgReas FilImgRea_<?php echo ($vo['num']); ?>" <?php if(count($vo['images']) >= 9): ?>style="display: none;"<?php endif; ?>>
											</div>
											<div class="DeleteImg">删除</div>
										</div>
						</div>
								<?php elseif($vo['typeid'] == 2): ?>
										<div class="InstallMainS2">
											<div class="standalone-container">
												<div class="snow-container snow-container-<?php echo ($vo['num']); ?>"><?php echo ($vo['text']); ?></div>
											</div>
											<div class="DeleteImg">删除</div>
										</div>
								<?php elseif($vo['typeid'] == 3): ?>
										<div class="InstallMainS2">
											<div class="TopImg">
												<em>聚合商品页</em>点击图片可删除已选中的商品
												<div class="bj5 edit">
													编辑
												</div>
											</div>
											<div class="ConcatSPAppendMain">
												<div class="CSPAMTxts" class_id="<?php echo ($vo['class_id']); ?>">
													<?php if(is_array($vo['addpage_group'])): foreach($vo['addpage_group'] as $key=>$v): ?><div class="Storagegroupdatails">
															<img src="<?php echo ($v['page_img']); ?>" alt="<?php echo ($v['addpage_info_id']); ?>">
														</div><?php endforeach; endif; ?>
												</div>
												<div style="clear: both;">
												</div>
											</div>
											<div class="DeleteImg">
												删除
											</div>
										</div><?php endif; endforeach; endif; ?>
						<?php else: ?>
						<div class="InstallMainS2">
							<div class="TopImg">
								<em>图片</em>最多添加9张图片，超过不能成功上传，图片大小不能超过2M
							</div>
							<div class="UploadImg">
								<div alt="9" class="shareImage FilImgReas FilImgRea_0">
								</div>
								<div class="DeleteImg">删除</div>
							</div>
						</div><?php endif; ?>
					</div>
					<div class="AppendIT">
						<div class="ConcatCmp" alt="<?php if(!empty($group_num)): echo ($group_num); else: ?>1<?php endif; ?>">添加商品页</div>
						<div class="ConcatImg" alt="<?php if(!empty($img_num)): echo ($img_num); else: ?>1<?php endif; ?>">添加图片</div>
						<div class="ConcatTxt" alt="<?php if(!empty($text_num)): echo ($text_num); else: ?>1<?php endif; ?>">添加文字</div>
					</div>
					</div>
				</div>
				<div class="ThreeBtns">
					<input type="hidden" value="<?php echo ($id); ?>" name="id"/>
					<button type="button" class="BtnOne" alt="0" lang="0">保存</button>
					<button type="button" class="BtnTwo" alt="0" lang="2">预览</button>
					<button type="button" class="BtnOne" alt="1" lang="1">发布</button>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="GetTogether">
	<div class="GetTogetherPre">
		<div class="GetTogetherTxt">编辑聚合商品页</div>
		<div class="Getclose"></div>
		<div class="REWarning">您已发布<em><?php echo count($group_info);?></em>个商品详情页，系统只拉取最近发布的200个详情页</div>
		<div class="GetTogetherCon">
			<div class="ResetStyle">
				<span class="span1">选择样式</span>
				<ul>
					<li>
						<i class="active" alt="1"></i>
						<dl>
							<dt class="m1"></dt>
							<dd>单列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：1044×556px，效果更佳哦。
							</div>
						</dl>
					</li>
					<li>
						<i alt="2"></i>
						<dl>
							<dt class="m2"></dt>
							<dd>双列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：512×556px，效果更佳哦。
							</div>
						</dl>
					</li>
					<li>
						<i alt="3"></i>
						<dl>
							<dt class="m3"></dt>
							<dd>三列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：334×360px，效果更佳哦。
							</div>
						</dl>
					</li>
				</ul>
			</div>
			<div class="ResetBook">
				<span class="span1">选择页面</span>
			</div>
			<form>
				<div class="ResetNumber">
					<span class="lf">已选择 <em class="rad" id="chosen">0</em> 个页面，还可再选择 <em class="rad" id="total_page" alt="<?php echo count($group_info);?>"><?php echo count($group_info);?></em> 个页面</span>
					<div class="rt">
						<label>
							<input type="text" placeholder="输入页面名称搜索页面" name="keyword" value=""/>
						</label>
					</div>
					<button type="button" class="RNBtns" id="search"></button>
				</div>
			</form>
			<div class="ResetImgList">
				<?php if(is_array($group_info)): foreach($group_info as $key=>$vo): ?><div class="ResetImgListCon">
						<i alt="<?php echo ($vo['id']); ?>"></i>
						<img src="<?php echo ($vo['page_img']); ?>"/>
						<div class="pic-document"><?php echo ($vo['page_name']); ?></div>
					</div><?php endforeach; endif; ?>
			</div>
			<div class="BookNameBtns">
				<div class="AppendBtns">
					<button type="button" class="RNClose">取消</button>
					<button type="button" class="RNTxt" alt="0" typeid="1" list="0">保存</button>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="TxtBack">
	<div class="TxtBackBg"></div>
	<div class="TxtBackPre">
		<div class="TBTop">
			<span class="lf">提示</span>
			<i class="TBClose"></i>
		</div>
		<div class="TBText">发布后不能修改，确认发布？</div>
		<div class="TBYn">
			<div class="TBNo">取消</div>
			<div class="TBYes">确定</div>
		</div>
	</div>
</div>
<div class="tipsSave">
	<div class="saveTip">
		<div class="h3">提示</div>
		<div class="close"></div>
		<div class="saveContent">
			<p>请先保存当前页面信息</p>
		</div>
		<div class="saveBtns">
			<button type="button" class="saveTo">确定</button>
		</div>
	</div>
</div>
<script src="/Public/Admin/js/jquery-1.12.4.js"></script>
<script src="/Public/Admin/js/swiper.min.js"></script>
<script src="/Public/Admin/js/colpack.js"></script>
<script src="/Public/Admin/js/main.js?v=<?php echo time();?>"></script>
<script src="/Public/Admin/js/uploadify/jquery.Huploadify.js"></script>
<script src="/Public/Admin/quilleditor/quill.min.js?v=<?php echo time();?>"></script>
<script src="/Public/Admin/js/groupdetails.js?v=<?php echo time();?>"></script>

<script type="text/javascript">
	//上传图片
	function upload_images(class_name){

		$('.'+class_name).Huploadify({
			buttonText: '请选择上传',
			auto: true,
			method: 'post',
			fileTypeExts: '*.jpg;*.png;*.gif;*.jpeg:*.JPG;*.PNG;*.GIF;*.JPEG',
			multi: true,
			simUploadLimit:6,
			formData: {key: 123456, key2: 'news'}, //banner是图片存放的目录
			fileSizeLimit: 2048,
			itemTemplate: '',//进度条，若显示进度条用 'itemTemp'
			showUploadedPercent: true,//是否实时显示上传的百分比，如20%
			showUploadedSize: true,
			removeTimeout: 1000,
			uploader: "/Admin/AddPage/UpdateImage",
			onUploadSuccess: function (file, data) {
				var items = JSON.parse(data);

				if(items.code == 200){
					var _imgstr = items.msg;
					var storageimg =
							'<div class="StorageImg">' +
							'<img src="' + _imgstr + '"/>' +
							'</div>'

					$('.'+class_name).before(storageimg);
					$('.'+class_name).stop().show();

					total = $('.'+class_name).parents(".UploadImg").find(".StorageImg").length;

					var total_element = $('.'+class_name).parents(".InstallMainS2").index();

					var html = '<div class="line1-img">';
					html += '<img src="' + _imgstr + '">';
					html += '</div>';

					$(".exhibition_id").eq(total_element).append(html);

					if(total >= 9){
						$('.'+class_name).stop().hide();
					}

				}else{
					$(".saveContent").find("p").html(list.msg);
					$('.tipsSave').stop().fadeIn();
					$('.saveTip').stop().animate({
						top: '37' + '%',
						opacity: '1'
					}, 300);
				}
			},
		});

	}

	<?php if(!empty($images_text)): if(is_array($images_text)): foreach($images_text as $k=>$vo): if($vo['typeid'] == 1): ?>upload_images("FilImgRea_<?php echo ($vo['num']); ?>");
			<?php elseif($vo['typeid'] == 2): ?>
			new Quill(".snow-container-<?php echo ($vo['num']); ?>", {placeholder: '请输入...', theme: 'snow'});<?php endif; endforeach; endif; ?>
	<?php else: ?>
	upload_images("FilImgRea_0");<?php endif; ?>
</script>
</body>
</html>